# -*- coding: utf-8 -*-
"""
模板描述结构定义。
"""
from __future__ import annotations

from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Type

from app.blueprints.reports.providers.base import BaseProvider


@dataclass(frozen=True)
class TemplateDescriptor:
    code: str
    name: str
    group: str
    provider_class: Type[BaseProvider]
    description: Optional[str] = None
    default_params: Dict[str, Any] = field(default_factory=dict)
    output_formats: List[str] = field(default_factory=lambda: ["html"])
    display_fields: List[str] = field(default_factory=list)
    extra: Dict[str, Any] = field(default_factory=dict)


